Question: Here is the website i am developing...

<http://camerabeanbags.co.uk/test/>

This is responsive so if you take the web browser window and change the width you can see the website alter. If you look at the 'Your Cart' button on the top right of the green bar you can see it is aligned on the right. If you change the width of the web browser window it aligns to the left.

How can i change the width the web browser has to be before it aligns this to the left as i want it to do it only when there is no space for them to be next to each other. As on an iPad it aligns to the left but i want it to align it to the right. I have tried with the CSS @media but can't figure it out for this certain element.

Please can you help me with the CSS i need so it only aligns to the left at a certain screen width.

Thanks,

Harvey

Answer: 
If you want to make sure that the numbers in `file1` are specifically in the last column of `file2`, you can use `sed` with a generated command file:

First generate the command file with `sed` or `awk`:

```
$ awk '{printf "/\t%s$/p\n", $1}' file1
/   2307492$/p
/   7349185$/p

```

Then feed that to `sed` to process file 2:

```
$ sed -n -f <(awk '{printf "/\t%s$/p\n", $1}' file1) file2
NC_000001.10:g.26131654G>A  7349185
NC_000001.11:g.25805163G>A  7349185
XR_921761.2:n.662T>C    2307492
XR_922278.2:n.1307-31218A>G 2307492

```

If just the presence of one of the numbers in `file1` in a line of `file2` should be printed, you can use `grep`:

```
$ grep -wFf file1 file2
NC_000001.10:g.26131654G>A  7349185
NC_000001.11:g.25805163G>A  7349185
XR_921761.2:n.662T>C    2307492
XR_922278.2:n.1307-31218A>G 2307492

```

Or, with `awk` you might read the numbers in file 1, split on `\t` and test col 2 of file 2:

```
$ awk -F"\t" 'FNR==NR{fi[$1]; next}
              $2 in fi' file1 file2
NC_000001.10:g.26131654G>A  7349185
NC_000001.11:g.25805163G>A  7349185
XR_921761.2:n.662T>C    2307492
XR_922278.2:n.1307-31218A>G 2307492

```

Any of those (I think) will be as fast as you are going to get without a database.
Not sure if it will be faster than what you tried, but what I think of is : 

Tranform `file1` in regex to pass to `awk` and while it parses each line of `file2` apply the regex : 

```
awk -F"\t" -v regex=`awk '{printf "%s|",$0} END{printf "\b"}' file1` '$2~regex{print $0}' file2

```

Details : 

`awk '{printf "%s|",$0} END{printf "\b"}'` will tranform : 

```
2307492
7349185

```

To : `2307492|7349185`

As the previous regex is stored in the `regex` variable : 

`'$2~regex{print $0}'` means : `'$2~/2307492|7349185/{print $0}'` ie : print the line if `$2` matched the regex