tomatoKetchup Posted November 6, 2014 Share Posted November 6, 2014 Hello, I wanted my website's display area to be exactly 768 px centered on the page. So here's the css properties I applied to the "main" div that contains every element I add on my webpage: div#main { margin-left: auto ; margin-right: auto ; width : 768px ;} It works, fine, however when I select several lines of text inside it, the blue selection is bleeding all the way to the left and right of the window (see attached image). How can I prevent this from happening? Thanks for reading! Thomas Link to comment Share on other sites More sharing options...
niche Posted November 6, 2014 Share Posted November 6, 2014 There's nothing to keep it from being selected based on the code you posted. You can verify this with your developer tools. Link to comment Share on other sites More sharing options...
tomatoKetchup Posted November 7, 2014 Author Share Posted November 7, 2014 So what would you change so that doesn't happen? Link to comment Share on other sites More sharing options...
dsonesuk Posted November 8, 2014 Share Posted November 8, 2014 It seems this effect is only happening in Chrome, other better browsers, and IE just highlight the text only. Link to comment Share on other sites More sharing options...
davej Posted November 8, 2014 Share Posted November 8, 2014 Why do you select the text? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now